package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import com.youlu.campus.entity.enums.ExpressWay;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 发货订单相
 */
@Data
@Document(collection = "deliveryOrderItem")
public class DeliveryOrderItem extends EntityBase {

    public final static String NOT_START = "notStart";

    public final static String SUCCESS = "success";

    public final static String FAIL = "fail";

    @Indexed
    private String taskId;

    private String taskName;
    //@Indexed
    private String expressCompanyName;
    //快递公司编码
    //@Indexed
    private String expressCompanyCode;
    @Indexed
    private String expressCompanyId;

    private String orderNo;
    //子订单号
    @Indexed
    private String subOrderNo;
    //运单号
    @Indexed
    private String expressNumber;
    @Indexed
    private String receiveName;
    @Indexed
    private String receiveMobile;
    private String address;

    private String itemName;
    //证书名称
    private String certificateName;
    //证书编号
    private String certificateNumber;

    private String province;

    private String city;

    private String county;

    private String status = NOT_START;
    //打印姓名
    private String caPrintName;
    //是否压线
    private String yaXian;
    //活动名称
    private String activityName;
    //delivery 待发货 已发货delivered
    private String deliveryStatus = "delivery";

    private Date syncTime;

    //发货时间
    private Date deliveryTime;

    /**
     * 批次号
     */
    @Indexed
    private String batchNo;

    //@Transient
    @Indexed
    private LocalDateTime timeEMS;

    private ExpressWay expressWay = ExpressWay.SF;


}
